package com.tdkj.model.information;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyInforModule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_info_module")
public class BeanInfoModule extends BaseEntity implements java.io.Serializable {

	// Fields

	private String modulename;
	private String moduletype;
	private List<BeanModuleColumn> moduleColumns = new ArrayList<BeanModuleColumn>(0);

	// Constructors

	/** default constructor */
	public BeanInfoModule() {
	}

	/** minimal constructor */
	public BeanInfoModule(long id) {
		this.setId(id);
	}

	public BeanInfoModule(String modulename, String moduletype) {
		// TODO Auto-generated constructor stub
		this.setModulename(modulename);
		this.setModuletype(moduletype);
	}

	@Column(name = "modulename", length = 40)
	public String getModulename() {
		return this.modulename;
	}

	public void setModulename(String modulename) {
		this.modulename = modulename;
	}

	@Column(name = "moduletype", length = 40)
	public String getModuletype() {
		return this.moduletype;
	}

	public void setModuletype(String moduletype) {
		this.moduletype = moduletype;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "inforModule")
	@OrderBy(value="columntype")
	public List<BeanModuleColumn> getModuleColumns() {
		return this.moduleColumns;
	}

	public void setModuleColumns(List<BeanModuleColumn> moduleColumns) {
		this.moduleColumns = moduleColumns;
	}

}